package com.ny.mapper;

import com.ny.entity.Classrooms;
import com.ny.entity.Users;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ClassroomMapper {

    List<Classrooms> findAllClassrooms();
    List<Classrooms> searchClassrooms(
            @Param("classroomName") String classroomName,
            @Param("capacity") String capacity,
            @Param("status") String status,
            @Param("building") String building,
            @Param("description") String description);

//    更新：
    @Update("update classrooms set status = #{status} where classroom_id = #{classroomId} ")
    void  updateClassroomStatusById( @Param("classroomId")int classroomId,@Param("status") String status);
}
